<template>
  <div class="setting-view">
    <div class="title"> 支出单是否开启审批：{{ settings.ifOpen ? '开启' : '关闭' }} </div>

    <a-timeline v-if="settings.ifOpen">
      <a-timeline-item v-for="(item, index) in settings.flowList" :label="item.postName || '-'" :key="item.id">
        {{ NUM_TEXT[index] }}级 | 审批人的岗位
      </a-timeline-item>
    </a-timeline>
  </div>
</template>

<script setup>
  defineProps({
    settings: {
      type: Object,
    },
  })

  const NUM_TEXT = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十']
</script>

<style lang="less" scoped>
  .title {
    font-weight: 500;
    font-size: 14px;
    color: #1d2129;
    line-height: 22px;
    margin-bottom: 24px;
  }
</style>
